package com.example.doudou.demos.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import lombok.Data;

/**
 * 商品信息表
 * @TableName products
 */
@TableName(value ="products")
@Data
public class Products {
    /**
     * 商品ID，自增主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 商品名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 商品详细描述
     */
    @TableField(value = "description")
    private String description;

    /**
     * 销售价格
     */
    @TableField(value = "price")
    private BigDecimal price;

    /**
     * 成本价格
     */
    @TableField(value = "cost_price")
    private BigDecimal costPrice;

    /**
     * 库存数量
     */
    @TableField(value = "stock_quantity")
    private Integer stockQuantity;

    /**
     * 分类ID
     */
    @TableField(value = "category_id")
    private Integer categoryId;

    /**
     * 品牌名称
     */
    @TableField(value = "brand")
    private String brand;

    /**
     * 库存单位编码(唯一标识)
     */
    @TableField(value = "sku")
    private String sku;

    /**
     * 条形码
     */
    @TableField(value = "barcode")
    private String barcode;

    /**
     * 商品重量(kg)
     */
    @TableField(value = "weight")
    private BigDecimal weight;

    /**
     * 商品尺寸(长x宽x高)
     */
    @TableField(value = "dimensions")
    private String dimensions;

    /**
     * 商品主图URL
     */
    @TableField(value = "image_url")
    private String imageUrl;

    /**
     * 是否上架(1:是 0:否)
     */
    @TableField(value = "is_active")
    private Integer isActive;

    /**
     * 创建时间
     */
    @TableField(value = "created_at")
    private LocalDateTime createdAt;

    /**
     * 最后更新时间
     */
    @TableField(value = "updated_at")
    private LocalDateTime updatedAt;

}